package JavaBase;

import java.util.Scanner;

public class calculatorTest {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Calculator cal=new Calculator();
        System.out.print("请输入左操作数：");
        double num1=input.nextDouble();
        System.out.print("请输入右操作数：");
        double num2=input.nextDouble();
        System.out.println(num1+"+"+num2+"="+cal.add(num1,num2));
        System.out.println(num1+"-"+num2+"="+cal.sub(num1,num2));
        System.out.println(num1+"*"+num2+"="+cal.mul(num1,num2));
        System.out.println(num1+"/"+num2+"="+cal.div(num1,num2));



    }
}
